A nonvolatile semiconductor memory such as a NAND flash memory chip includes a large number of memory cells therein, and is configured to record data in the memory cells by replacing information with the amounts of charge. The voltages of the memory cells change according to the amounts of charge accumulated in floating gates, and the memory cells store data according to the differences in voltage. Reading of data from the memory cells is performed by detecting voltages depending on the charges and performing determination based on thresholds. Data read from the memory cells are subjected to decoding of error correcting codes that have been added thereto when the data were written, then subjected to error correction, and output, for example.
When write and read cycles are repeated in a nonvolatile semiconductor memory, memory cells are gradually deteriorated and read errors occur frequently. Furthermore, the frequency of read errors also changes owing to the environment (such as device temperature) in reading. Since such errors due to deterioration of memory cells and the reading environment have specific tendency, the errors can be relieved through retry read using shift read that is reading with shifted thresholds.
The optimum values of the shift read for the retry read, however, are normally unknown, and the retry read needs to be repeated while switching conditions for the shift read according to a shift table prepared in advance. Furthermore, in particular, in a case of a multi-valued memory in which data of a multi-valued bit are stored in one memory cell, reading needs to be performed multiple number of times to reduce noise in reading. Furthermore, as a result of performing reading multiple number of times through retry read on the memory cells in this manner, read disturb may occur.